Skip to content

Change setException to setError #10725

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Dec 27, 2018
Merged

Change setException to setError #10725

merged 1 commit into from
Dec 27, 2018

Conversation

Landerstraeten
Copy link

@Landerstraeten Landerstraeten commented Dec 3, 2018

#SymfonyConHackDay2018

@kunicmarko20
Copy link
Contributor

The type hint and the use statement should also change since the name is different:

https://github.com/symfony/console/blob/master/Event/ConsoleErrorEvent.php

it is ConsoleErrorEvent and not ConsoleExceptionEvent.

@Landerstraeten Landerstraeten changed the base branch from 3.4 to 4.1 December 3, 2018 14:14
@Landerstraeten
Copy link
Author

Thank you @kunicmarko20. After validating my own pr I saw:

  • The code example for ConsoleExceptionEvent is correct in 3.4
  • The is no code example for ConsoleErrorEvent since it's an improved version of the ConsoleEvents::EXCEPTION event
  • The class ConsoleExceptionEvent does not exist anymore in 4.1
  • The code example for ConsoleErrorEvent is wrong for 4.1. Fixed in this PR
  • The code example for ConsoleErrorEvent is wrong for 4.2. But should be fixed if 4.1 is merged into 4.2
  • The code example for ConsoleErrorEvent is wrong for 4.3. But should be fixed if 4.1 is merged into 4.3

@kunicmarko20
Copy link
Contributor

kunicmarko20 commented Dec 3, 2018

This (method name, import, and typehint) should probably be changed for 3.4 and up since the ConsoleExceptionEvent is deprecated on 3.4. Let's wait for the docs team and see what they say.

@Landerstraeten
Copy link
Author

@javiereguiluz what do you suggest?

@stof
Copy link
Member

stof commented Dec 8, 2018

The 3.4 doc should indeed be updated to showcase the non-deprecated version of it.

@Landerstraeten Landerstraeten changed the base branch from 4.1 to 3.4 December 8, 2018 14:49
@javiereguiluz
Copy link
Member

@Landerstraeten thanks for improving 3.4 code and fixing the other branches code (we'll do that when merging this into 4.1 and higher). Also, congrats on your first Symfony dDocs contribution!

@javiereguiluz javiereguiluz merged commit d9a5c2a into symfony:3.4 Dec 27, 2018
javiereguiluz added a commit that referenced this pull request Dec 27, 2018
This PR was merged into the 3.4 branch.

Discussion
----------

Change setException to setError

#SymfonyConHackDay2018

Commits
-------

d9a5c2a Fix console error event
nikophil pushed a commit to nikophil/symfony-docs that referenced this pull request Jan 3, 2019
This PR was merged into the 3.4 branch.

Discussion
----------

Change setException to setError

#SymfonyConHackDay2018

Commits
-------

d9a5c2a Fix console error event
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants